﻿using System;
using System.Collections.Generic;
using System.IO;
using System.Linq;
using System.Text;

namespace SharpIM.Http
{
    public class FileResult : IHttpResult
    {
        /// <summary>
        /// must be the file full path
        /// </summary>
        public string Path { get; set; }
        public string ContentType { get; set; }

        public ResponseStream ToResponseStream()
        {
            var fs = File.Open(Path, FileMode.Open);
            return new ResponseStream(fs);
        }
    }
}
